﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TireBias.Models.BIASPLANModel.BIASPLAN_DS>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Bias Plan LIST
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="cap shadow txt13bold">
         BIAS NO :
      </div>
      <div id="code" class="desc txt13bold" style="width: 200px;">
      <input type="text" id="txtBias" value="<%=  ViewBag.Biasno  %>"  />
      </div>
      
          <div class="cap shadow txt13bold">
         PLAN DATE :
      </div>
      <div id="Txtpladt" class="desc txt13bold" style="width: 200px;">
          <input type="text" id="dFrom" value="<%=  ViewBag.dtPlan  %>"  />
         
      </div>
      
      <button  id="search"></button>
        <style type="text/css">
      .chk:hover
      {
         cursor: pointer;
       
      }
      .actived
      {
        color:#ff0000;      /*red*/               
      }      
    
      .txt
      {
          background-color:#f8f8e8 !important;
          border-right: #000 1px solid  !important;
      }
      .hide
      { display:none;
         }
    .skip
    {
        color:Red !important;
    }
      .samp
    {
        color:#FF6D00 !important;
    }
    .nfin
    {
         color:Blue !important;
    }
   </style>
<h2>ViewPlan</h2>


   <table class="shadow" id="UseTbl" style="text-align:left; margin:0px 0px 0px 0px;text-align:left; ">
  
   <thead>
         <tr class="cell" style="background-color:#ccc; color:#000; font-weight:bold;text-align:center;"><td colspan="9">USED PLAN</td></tr>
         <tr class="head"  id="trUse" style="background-color:#008080; color:White;">
            <td class="cell" style="width: 120px;">
               SEQ
            </td>
    
           <td class="cell" style="width: 150px;">
               TOPPED CORD
            </td>
            <td class="cell" style="width: 150px;">
               SIZE
            </td>
            <td class="cell" style="width: 50px;">
               P1
            </td>  
            <td class="cell" style="width: 50px;">
               P2
            </td>  
               <td class="cell" style="width: 50px;">
               P3
            </td>  
               <td class="cell" style="width: 50px;">
               P4
            </td>  
            <td class="cell" style="width: 120px;">
               FORMING
            </td>
             <td class="cell" style="width: 120px;">
               TEXT
            </td>
         </tr>         
   </thead>

<% foreach (var item in Model) {

       string clsAdd = "";
       if (WinNemoLib.StrUtil.IsNotEmpty(item._Skpflag))
       {
           clsAdd = "skip";
       }
       if (WinNemoLib.StrUtil.IsNotEmpty(item._nfinemp))
       {
           clsAdd = "nfin";
       }
       if (WinNemoLib.StrUtil.IsNotEmpty(item._Smpemp))
       {
           clsAdd = "samp";
       }
       %>
    <tr class=" head rowa <%: clsAdd %>">
          <td class="cell" style="width: 120px;">
        <%: Html.DisplayFor(modelItem => item._Plandt) %>  -  <%: Html.DisplayFor(modelItem => item._Itemno) %>
        </td>
        <td class="cell" style="width: 150px;">
            <%: Html.DisplayFor(modelItem => item._Topcrdcd) %>
        </td>
        <td class="cell" style="width: 150px;">
            <%: Html.DisplayFor(modelItem => item._Size) %>
        </td>
        <td class="cell" style="width: 50px;">
            <%: Html.DisplayFor(modelItem => item._P1) %>
        </td>
  <td class="cell" style="width: 50px;">
            <%: Html.DisplayFor(modelItem => item._P2) %>
        </td>
 <td class="cell" style="width: 50px;">
            <%: Html.DisplayFor(modelItem => item._P3) %>
        </td>
 <td class="cell" style="width: 50px;">
            <%: Html.DisplayFor(modelItem => item._P4) %>
        </td>
         <td class="cell" style="width: 120px;">
            <%: Html.DisplayFor(modelItem => item._Forming) %>
        </td>
   <td class="cell" style="width: 120px;">
            <%: Html.DisplayFor(modelItem => item._Text) %>
        </td>

    </tr>
<% } %>

</table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="TableContent" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="ScriptsSection" runat="server">
     <script type="text/javascript">
         $(function () {
             $('#dFrom').dateEntry({ useMouseWheel: false, dateFormat: 'dmy/' })
             $("#txtBias").setMask("999");
             var dt = $("#dFrom").val();
             var no = $("#txtBias").val();

             $("#dFrom,#txtBias").change(function () {
                 dt = $("#dFrom").val();
                 no = $("#txtBias").val();
             });

             $("#search").button({
                 icons: { primary: 'ui-icon-circle-zoomout' }, text: false
             }).click(function () {

                 var url = '<%=Url.Action("ViewPlan") %>' + '?dtPlan=' + dt;
                 url = url + '&bias=' + no;
                 window.location = url;
             }); //click
         });
     </script>
</asp:Content>
